# uart.c File Reference

Module to simulate the AVR's uart module. More...

Go to the source code of this file.

## Functions

VDevice * | uart_int_create (int addr, char *name, int rel_addr, void *data)
UARTIntr_T * | uart_intr_new (int addr, char *name, void *data)
void | uart_intr_construct (UARTIntr_T *uart, int addr, char *name)
void | uart_intr_destroy (void *uart)
VDevice * | uart_create (int addr, char *name, int rel_addr, void *data)
UART_T * | uart_new (int addr, char *name, int rel_addr)
void | uart_construct (UART_T *uart, int addr, char *name, int rel_addr)
void | uart_destroy (void *uart)
uint16_t | uart_port_rd (int addr)
void | uart_port_wr (uint8_t val)

## Variables

unsigned int | UART_Int_Table []
unsigned int | UART0_Int_Table []
unsigned int | UART1_Int_Table []

## Detailed Description

Module to simulate the AVR's uart module.

Definition in file uart.c.

## Function Documentation

VDevice* uart_int_create | ( | int | addr,
|  | char * | name,
|  | int | rel_addr,
|  | void * | data |
| ) |  |  |

Allocate a new uart interrupt.

Definition at line 95 of file uart.c.

References avr_error.

void uart_intr_construct | ( | UARTIntr_T * | uart,
|  | int | addr,
|  | char * | name |
| ) |  |  |

Constructor for uart interrupt object.

Definition at line 128 of file uart.c.

References avr_error, and vdev_construct().

void uart_intr_destroy | ( | void * | uart | ) |

Destructor for uart interrupt object.

Definition at line 179 of file uart.c.

References vdev_destroy().

VDevice* uart_create | ( | int | addr,
|  | char * | name,
|  | int | rel_addr,
|  | void * | data |
| ) |  |  |

Allocate a new uart structure.

Definition at line 335 of file uart.c.

void uart_construct | ( | UART_T * | uart,
|  | int | addr,
|  | char * | name,
|  | int | rel_addr |
| ) |  |  |

Constructor for uart object.

Definition at line 356 of file uart.c.

References avr_error, and vdev_construct().

void uart_destroy | ( | void * | uart | ) |

Destructor for uart object.

Definition at line 389 of file uart.c.

References vdev_destroy().

## Variable Documentation

unsigned int UART_Int_Table[]

Initial value:

     {
        irq_vect_table_index (UART_RX),
        irq_vect_table_index (UART_UDRE),
        irq_vect_table_index (UART_TX)
    }

Definition at line 74 of file uart.c.

unsigned int UART0_Int_Table[]

Initial value:

     {
        irq_vect_table_index (USART0_RX),
        irq_vect_table_index (USART0_UDRE),
        irq_vect_table_index (USART0_TX)
    }

Definition at line 80 of file uart.c.

unsigned int UART1_Int_Table[]

Initial value:

     {
        irq_vect_table_index (USART1_RX),
        irq_vect_table_index (USART1_UDRE),
        irq_vect_table_index (USART1_TX)
    }

Definition at line 86 of file uart.c.

Automatically generated by Doxygen 1.5.5 on 7 Nov 2008.